//#include<bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;

int su[20005] = { 0 }, cnt = 0;
bool vis[20005];
void o_init(int n) {
	for (int i = 2;i <= n;i++) {
		if (vis[i] == false)
			su[++cnt] = i;
		for (int j = 1;j <= cnt && su[j] * i <= n;j++) {
			vis[su[j] * i] = true;
			if (i % su[j] == 0)
				break;
		}
	}
	return;
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int n;
	cin >> n;
	o_init(n);
	for (int i = 1;i <= cnt;i++) {
		for (int j = i;j <= cnt;j++) {
			for (int k = cnt;k >= j;k--) {
				if (su[i] + su[j] + su[k] == n) {
					cout << su[i] << " " << su[j] << " " << su[k] << endl;
					return 0;
				}
			}
		}
	}
	return 0;
}